package com.zzs.server.pojo.dto.code;

import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author zzs
 * @date 2025/03/18
 */
@AllArgsConstructor
@NoArgsConstructor
@Data
public class UpdateProblemCodeDTO {
    @NotNull(message = "必须指定题目")
    private Long problemId;

    @NotNull(message = "必须指定语言")
    @Min(value = 1, message = "必须选择有效的语言区间")
    @Max(value = 1, message = "必须选择有效的语言区间")
    private Integer language;

    @NotBlank(message = "main方法不能为空")
    private String mainFunction;

    @NotBlank(message = "用户可见的函数模板不能为空")
    private String userFunction;
}
